﻿
namespace NetworkTools {
    public static class IntArrayExtensions {
        public static object[] ToObjects(this int[] array) {
            object[] result = new object[array.Length];
            for (int i = 0; i < array.Length; i++) {
                result[i] = array[i];
            }
            return result;
        }

        public static int? IndexOf(this int[] array, int val) {
            for (int i = 0; i < array.Length; i++) {
                if (array[i] == val) {
                    return i;
                }
            }
            return null;
        }
    }
}
